#pragma once
#include <cstdio>
#include <iostream>
#include <string>
#include <functional>
#include <unistd.h>
#include "tcpLog.hpp"
#define NUM 1024

class Task
{
public:
    typedef std::function<void(int)> func_t;
    Task() = default;
    Task(int sock, func_t callBack)
        :_sock(sock), _callBack(callBack)
    {
    }
    
    void operator()()
    {
        _callBack(_sock);
    }

private:
    int _sock;
    func_t _callBack;
};

